//1，导入vue和Vuex
import Vue from 'vue'
import Vuex from 'vuex'

import moduleMarket from '@/store/market.js'
import moduleUserInfo from '@/store/user-info.js'
import moduleChat from '@/store/chat.js'

//2，将vuex安装为vue的插件
Vue.use(Vuex)

//3，创建store的实例对象
const store = new Vuex.Store({
	//todo:挂载 store模块
	modules: {
		'm_market': moduleMarket,
		'm_user_info': moduleUserInfo,
		'm_chat': moduleChat
	},
})

//4，向外共享store的实例对象
export default store
